window.plugin = {};
var i = 0;
window.plugin.call = function(a)
{
//	alert("" + a);
	log("Call native code from JavaScript:", "callFromNative");
}

window.log = function(a, callback)
{
	  window.location.href = 'http://CallFromJavaScript/?function=log&package=com.testPlugin&callback=' + callback +'&content='+a;
}

window.plugin.callFromNative = function(c)
{
//    alert('' + c);
	console.log("Called at " + i);
	if (i == 100)
	{
		console.log("Finish at: " + new Date().getTime());
	}
	
}

function test()
{
	console.log("Started at: " + new Date().getTime());
	for (i = 0; i < 100; i++)
	{
		window.plugin.call("Hello");
		console.log("Couting: " + i);
	}
}